<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8"/>
    <title>厅干部平时考核管理系统</title>

    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/views/addBeChecker.js'/>"></script>
    <script>
        function submitForm(){
            var ids=[];
            var names=[];
            var data = $('#boot_table') .bootstrapTable('getAllSelections');
            $.each( data, function(index,item){
                ids.push(item.dbId);
                names.push(item.name);
            });
            $.ajax({
                type:"post",
                dataType:"json",
                url:"/jxkh/task/relation/saveBeChecker.json",
                data:{
                    deptid: $("#deptid").val(),
                    checkerdbid: $("#checkerdbid").val(),
                    ids:ids.toString(),
                    usernames:names.toString()
                },
                success:function(data){
                    parent.showMessage("操作成功！");
                    parent.refreshTable1();
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                }
            })

        }

    </script>
</head>
<body>
<input type="hidden" name="checkerdbid" id="checkerdbid" value="${checkerdbid }" />
<input type="hidden" name="deptid" id="deptid" value="${deptid }" />
    <div class="bmkhcp">
        <div class="bmkhcp_row">
            <div class="bmkhcp_lf">
                     <div class="rygl">
                         <div class="rygl_lf" id="rygl_lf">
                             <ul id="treeDemo" class="ztree" style="width:220px;overflow-x:hidden;height: 350px;"></ul>
                         </div>
                         <div class="rygl_rt" id="rygl_rt">
                             <div class="rygl_rt_main">
                                <table id="boot_table"></table>
                             </div>
                         </div>
                     </div>
            </div>
        </div>
    </div>
</body>

</html>